import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;

public class AppTest 
{
  public static void main(String[] args) throws Exception 
  {
    Logger logger = Logger.getLogger(AppTest.class.toString());
    List<BetUser> betUserList = new ArrayList<>();
    {
      betUserList.add(new BetUser("花花", 65));
      betUserList.add(new BetUser("豆豆", 43));
      betUserList.add(new BetUser("小白", 72));
      betUserList.add(new BetUser("笨笨", 89));
      betUserList.add(new BetUser("丑蛋", 10));
    }

    DrawControl drawControl = new DrawControl();
    {
      List<BetUser> prizeRandomUserList = drawControl.doDraw(new DrawRandom(), betUserList, 3);
      logger.info("随机抽奖，中奖用户名单：" + prizeRandomUserList);

      List<BetUser> prizeWeightUserList = drawControl.doDraw(new DrawWeightRank(), betUserList, 3);
      logger.info("权重抽奖，中奖用户名单：" + prizeWeightUserList);
    }
  }
}
